<html><head><title>SaveSprite</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">SaveSprite()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#006666"><b>SaveSprite</b></font>(#Sprite, Filename$ [, ImagePlugin [, Flags]])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Saves the specified sprite to a file. By default, the saved image will be in 24-bit BMP format. 
Very useful for screenshots when used with the <a href="grabsprite.html">GrabSprite()</a> function. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Sprite</i></td>
<td width="90%"> 
The sprite to save. 

</td></tr>
<tr><td><i>Filename$</i></td>
<td> 
The filename to use for the saved sprite. 

</td></tr>
<tr><td><i>ImagePlugin (optional)</i></td>
<td> 
It can be one of the following constant: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_ImagePlugin_BMP</font>     : Save the image in BMP  (default).
  <font color="#924B72">#PB_ImagePlugin_JPEG</font>    : Save the image in JPEG (the function <a href="../imageplugin/usejpegimageencoder.html">UseJPEGImageEncoder()</a> has to be used).
  <font color="#924B72">#PB_ImagePlugin_JPEG2000</font>: Save the image in JPEG2000 (the function <a href="../imageplugin/usejpeg2000imageencoder.html">UseJPEG2000ImageEncoder()</a> has to be used).
  <font color="#924B72">#PB_ImagePlugin_PNG</font>     : Save the image in PNG  (the function <a href="../imageplugin/usepngimageencoder.html">UsePNGImageEncoder()</a> has to be used).
</font></pre>

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
Additional control over saving for the specified plug-in. For now, only quality setting is supported: 
a number from 0 (worse quality) to 10 (maximum quality). Only the JPEG and JPEG 2000 plugins currently support it (default 
quality is set to '7' if no flags are specified). 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Nonzero if the sprite has been successfully saved, zero otherwise. 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="loadsprite.html">LoadSprite()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=rotatesprite.html>RotateSprite()</a> - <a href=index.html>Sprite Index</a> - <a href=spriteblendingmode.html>SpriteBlendingMode()</a> ->

</body></html>